www.gusucode.com > 串口测试程序,用于调试rs485接口 串口通信的程序 > 串口测试程序,用于调试rs485接口 串口通信的程序/commtest/ComParaSet.cpp
// ComParaSet.cpp : implementation file // #include "stdafx.h" #include "CommTest.h" #include "ComParaSet.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CComParaSet dialog CComParaSet::CComParaSet(CWnd* pParent /*=NULL*/) : CDialog(CComParaSet::IDD, pParent) { //{{AFX_DATA_INIT(CComParaSet) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CComParaSet::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CComParaSet) DDX_Control(pDX, IDC_COMBO_STOP, m_cmb_stop); DDX_Control(pDX, IDC_COMBO_PARI, m_cmb_pari); DDX_Control(pDX, IDC_COMBO_COM_NUM, m_cmb_com_num); DDX_Control(pDX, IDC_COMBO_BYTE, m_cmb_bytes); DDX_Control(pDX, IDC_COMBO_BPS, m_cmb_bps); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CComParaSet, CDialog) //{{AFX_MSG_MAP(CComParaSet) ON_BN_CLICKED(IDC_BUTTON_OK, OnButtonOk) ON_BN_CLICKED(IDC_BUTTON_CANCEL, OnButtonCancel) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CComParaSet message handlers void CComParaSet::OnButtonOk() { // TODO: Add your control notification handler code here UpdateData(TRUE); OnOK(); } void CComParaSet::OnButtonCancel() { // TODO: Add your control notification handler code here UpdateData(FALSE); CDialog::OnCancel(); }